package com.hmall.item.mapper;

import com.hmall.item.pojo.Item;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author mengjie
 */

@Mapper
public interface ItemMapper {

    // @Select("SELECT * FROM tb_item LIMIT #{start}, #{size}")
    List<Item> getItems(@Param("start") int start, @Param("size") int size);

    void update(Item item);

    void save(Item item);

    long count();

    void updateStatus(Long id, Long status);

    int deleteById(Long id);

    Item getById(Long id);

    List<String> getCategory();

    List<String> getBrand();
}
